home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / MIDI.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  20.3 KB  |  555 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        MIDI.p
  3.  
  4.      Contains:    MIDI Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1988-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT MIDI;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __MIDI__}
  27. {$SETC __MIDI__ := 1}
  28.  
  29. {$I+}
  30. {$SETC MIDIIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __ERRORS__}
  34. {$I Errors.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __MACTYPES__}
  37. {$I MacTypes.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __MIXEDMODE__}
  40. {$I MixedMode.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {
  49.                         * * *  N O T E  * * * 
  50.  
  51.     This file has been updated to include MIDI 2.0 interfaces.  
  52.     
  53.     The MIDI 2.0 interfaces were developed for the classic 68K runtime.
  54.     Since then, Apple has created the PowerPC and CFM 68K runtimes.
  55.     Currently, the extra functions in MIDI 2.0 are not in InterfaceLib
  56.     and thus not callable from PowerPC and CFM 68K runtimes (you'll
  57.     get a linker error).  
  58. }
  59.  
  60.  
  61. CONST
  62.     midiMaxNameLen                = 31;                            { maximum number of characters in port and client names }
  63.  
  64.                                                                 {  Time formats  }
  65.     midiFormatMSec                = 0;                            { milliseconds }
  66.     midiFormatBeats                = 1;                            { beats }
  67.     midiFormat24fpsBit            = 2;                            { 24 frames/sec. }
  68.     midiFormat25fpsBit            = 3;                            { 25 frames/sec. }
  69.     midiFormat30fpsDBit            = 4;                            { 30 frames/sec. drop-frame }
  70.     midiFormat30fpsBit            = 5;                            { 30 frames/sec. }
  71.     midiFormat24fpsQF            = 6;                            { 24 frames/sec. longInt format  }
  72.     midiFormat25fpsQF            = 7;                            { 25 frames/sec. longInt format  }
  73.     midiFormat30fpsDQF            = 8;                            { 30 frames/sec. drop-frame longInt format  }
  74.     midiFormat30fpsQF            = 9;                            { 30 frames/sec. longInt format  }
  75.  
  76.     midiInternalSync            = 0;                            { internal sync }
  77.     midiExternalSync            = 1;                            { external sync }
  78.  
  79.                                                                 {  Port types }
  80.     midiPortTypeTime            = 0;                            { time port }
  81.     midiPortTypeInput            = 1;                            { input port }
  82.     midiPortTypeOutput            = 2;                            { output port }
  83.     midiPortTypeTimeInv            = 3;                            { invisible time port }
  84.     midiPortInvisible            = $8000;                        { logical OR this to other types to make invisible ports }
  85.     midiPortTypeMask            = $0007;                        { logical AND with this to convert new port types to old, i.e. to strip the property bits }
  86.  
  87.                                                                 {  OffsetTimes   }
  88.     midiGetEverything            = $7FFFFFFF;                    { get all packets, regardless of time stamps }
  89.     midiGetNothing                = $80000000;                    { get no packets, regardless of time stamps }
  90.     midiGetCurrent                = $00000000;                    { get current packets only }
  91.  
  92. {    MIDI data and messages are passed in MIDIPacket records (see below).
  93.     The first byte of every MIDIPacket contains a set of flags
  94.  
  95.     bits 0-1    00 = new MIDIPacket, not continued
  96.                      01 = begining of continued MIDIPacket
  97.                      10 = end of continued MIDIPacket
  98.                      11 = continuation
  99.     bits 2-3     reserved
  100.  
  101.     bits 4-6      000 = packet contains MIDI data
  102.  
  103.                   001 = packet contains MIDI Manager message
  104.  
  105.     bit 7         0 = MIDIPacket has valid stamp
  106.                   1 = stamp with current clock
  107. }
  108.     midiContMask                = $03;
  109.     midiNoCont                    = $00;
  110.     midiStartCont                = $01;
  111.     midiMidCont                    = $03;
  112.     midiEndCont                    = $02;
  113.     midiTypeMask                = $70;
  114.     midiMsgType                    = $00;
  115.     midiMgrType                    = $10;
  116.     midiTimeStampMask            = $80;
  117.     midiTimeStampCurrent        = $80;
  118.     midiTimeStampValid            = $00;
  119.  
  120.                                                                 {  MIDIPacket command words (the first word in the data field for midiMgrType messages)  }
  121.     midiOverflowErr                = $0001;
  122.     midiSCCErr                    = $0002;
  123.     midiPacketErr                = $0003;                        { all command words less than this value are error indicators }
  124.     midiMaxErr                    = $00FF;
  125.  
  126.                                                                 {  Valid results to be returned by readHooks  }
  127.     midiKeepPacket                = 0;
  128.     midiMorePacket                = 1;
  129.     midiNoMorePacket            = 2;
  130.     midiHoldPacket                = 3;
  131.  
  132.                                                                 {  Driver calls  }
  133.     midiOpenDriver                = 1;
  134.     midiCloseDriver                = 2;
  135.  
  136.     mdvrAbortNotesOff            = 0;                            { abort previous mdvrNotesOff request }
  137.     mdvrChanNotesOff            = 1;                            { generate channel note off messages }
  138.     mdvrAllNotesOff                = 2;                            { generate all note off messages }
  139.  
  140.     mdvrStopOut                    = 0;                            { stop calling MDVROut temporarily }
  141.     mdvrStartOut                = 1;                            { resume calling MDVROut }
  142.  
  143.  
  144. TYPE
  145.     MIDIPacketPtr = ^MIDIPacket;
  146.     MIDIPacket = PACKED RECORD
  147.         flags:                    UInt8;
  148.         len:                    UInt8;
  149.         tStamp:                    LONGINT;
  150.         data:                    PACKED ARRAY [0..248] OF UInt8;
  151.     END;
  152.  
  153. {$IFC TYPED_FUNCTION_POINTERS}
  154.     MIDIReadHookProcPtr = FUNCTION(myPacket: MIDIPacketPtr; myRefCon: LONGINT): INTEGER;
  155. {$ELSEC}
  156.     MIDIReadHookProcPtr = ProcPtr;
  157. {$ENDC}
  158.  
  159. {$IFC TYPED_FUNCTION_POINTERS}
  160.     MIDITimeProcPtr = PROCEDURE(curTime: LONGINT; myRefCon: LONGINT);
  161. {$ELSEC}
  162.     MIDITimeProcPtr = ProcPtr;
  163. {$ENDC}
  164.  
  165. {$IFC TYPED_FUNCTION_POINTERS}
  166.     MIDIConnectionProcPtr = PROCEDURE(refnum: INTEGER; refcon: LONGINT; portType: INTEGER; clientID: OSType; portID: OSType; connect: BOOLEAN; direction: INTEGER);
  167. {$ELSEC}
  168.     MIDIConnectionProcPtr = ProcPtr;
  169. {$ENDC}
  170.  
  171. {$IFC TYPED_FUNCTION_POINTERS}
  172.     MDVRCommProcPtr = FUNCTION(refnum: INTEGER; request: INTEGER; refCon: LONGINT): LONGINT;
  173. {$ELSEC}
  174.     MDVRCommProcPtr = ProcPtr;
  175. {$ENDC}
  176.  
  177. {$IFC TYPED_FUNCTION_POINTERS}
  178.     MDVRTimeCodeProcPtr = PROCEDURE(refnum: INTEGER; newFormat: INTEGER; refCon: LONGINT);
  179. {$ELSEC}
  180.     MDVRTimeCodeProcPtr = ProcPtr;
  181. {$ENDC}
  182.  
  183. {$IFC TYPED_FUNCTION_POINTERS}
  184.     MDVRReadProcPtr = PROCEDURE(midiChars: CStringPtr; length: INTEGER; refCon: LONGINT);
  185. {$ELSEC}
  186.     MDVRReadProcPtr = ProcPtr;
  187. {$ENDC}
  188.  
  189.     MIDIReadHookUPP = UniversalProcPtr;
  190.     MIDITimeUPP = UniversalProcPtr;
  191.     MIDIConnectionUPP = UniversalProcPtr;
  192.     MDVRCommUPP = UniversalProcPtr;
  193.     MDVRTimeCodeUPP = UniversalProcPtr;
  194.     MDVRReadUPP = UniversalProcPtr;
  195.     MIDIClkInfoPtr = ^MIDIClkInfo;
  196.     MIDIClkInfo = RECORD
  197.         syncType:                INTEGER;                                { synchronization external/internal }
  198.         curTime:                LONGINT;                                { current value of port's clock }
  199.         format:                    INTEGER;                                { time code format }
  200.     END;
  201.  
  202.     MIDIIDRecPtr = ^MIDIIDRec;
  203.     MIDIIDRec = RECORD
  204.         clientID:                OSType;
  205.         portID:                    OSType;
  206.     END;
  207.  
  208.     MIDIPortInfoPtr = ^MIDIPortInfo;
  209.     MIDIPortInfo = RECORD
  210.         portType:                INTEGER;                                { type of port }
  211.         timeBase:                MIDIIDRec;                                { MIDIIDRec for time base }
  212.         numConnects:            INTEGER;                                { number of connections }
  213.         cList:                    ARRAY [0..0] OF MIDIIDRec;                { ARRAY [1..numConnects] of MIDIIDRec }
  214.     END;
  215.  
  216.     MIDIPortInfoHdl                        = ^MIDIPortInfoPtr;
  217.     MIDIPortInfoHandle                    = ^MIDIPortInfoPtr;
  218.     MIDIPortParamsPtr = ^MIDIPortParams;
  219.     MIDIPortParams = RECORD
  220.         portID:                    OSType;                                    { ID of port, unique within client }
  221.         portType:                INTEGER;                                { Type of port - input, output, time, etc. }
  222.         timeBase:                INTEGER;                                { refnum of time base, 0 if none }
  223.         offsetTime:                LONGINT;                                { offset for current time stamps }
  224.         readHook:                MIDIReadHookUPP;                        { routine to call when input data is valid }
  225.         refCon:                    LONGINT;                                { refcon for port (for client use) }
  226.         initClock:                MIDIClkInfo;                            { initial settings for a time base }
  227.         name:                    Str255;                                    { name of the port, This is a real live string, not a ptr. }
  228.     END;
  229.  
  230.     MIDIIDListPtr = ^MIDIIDList;
  231.     MIDIIDList = RECORD
  232.         numIDs:                    INTEGER;
  233.         list:                    ARRAY [0..0] OF OSType;
  234.     END;
  235.  
  236.     MIDIIDListHdl                        = ^MIDIIDListPtr;
  237.     MIDIIDListHandle                    = ^MIDIIDListPtr;
  238. {  MDVR Control structs }
  239.     MDVRInCtlRecPtr = ^MDVRInCtlRec;
  240.     MDVRInCtlRec = RECORD
  241.         timeCodeClock:            INTEGER;                                { refnum of time base for time code }
  242.         timeCodeFormat:            INTEGER;                                { format of time code output }
  243.         readProc:                MDVRReadUPP;                            { proc to call with intput characters }
  244.         commProc:                MDVRCommUPP;                            { proc to call for handshaking }
  245.         refCon:                    LONGINT;                                { refCon passed to readProc, commProc }
  246.     END;
  247.  
  248.     MDVRInCtlPtr                        = ^MDVRInCtlRec;
  249.     MDVROutCtlRecPtr = ^MDVROutCtlRec;
  250.     MDVROutCtlRec = RECORD
  251.         timeCodeClock:            INTEGER;                                { time base driven by time code }
  252.         timeCodeFormat:            INTEGER;                                { format of time code to listen to }
  253.         timeCodeProc:            MDVRTimeCodeUPP;                        { proc called on time code fmt change }
  254.         commProc:                MDVRCommUPP;                            { proc called for handshaking }
  255.         refCon:                    LONGINT;                                { refCon passed to timeCodeProc }
  256.         timeCodeFilter:            BOOLEAN;                                { filter time code if true }
  257.         padding:                SInt8;                                    { unused pad byte }
  258.         midiMsgTicks:            LONGINT;                                { value of Ticks when MIDI msg rcvd }
  259.         timeCodeTicks:            LONGINT;                                { value of Ticks when time code rcvd }
  260.     END;
  261.  
  262.     MDVROutCtlPtr                        = ^MDVROutCtlRec;
  263.     MDVRPtr                                = Ptr;
  264. FUNCTION MIDIVersion: NumVersion;
  265.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  266.     INLINE $203C, $0000, $0004, $A800;
  267.     {$ENDC}
  268. FUNCTION MIDISignIn(clientID: OSType; refCon: LONGINT; icon: Handle; name: Str255): OSErr;
  269.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  270.     INLINE $203C, $0004, $0004, $A800;
  271.     {$ENDC}
  272. PROCEDURE MIDISignOut(clientID: OSType);
  273.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  274.     INLINE $203C, $0008, $0004, $A800;
  275.     {$ENDC}
  276. FUNCTION MIDIGetClients: MIDIIDListHandle;
  277.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  278.     INLINE $203C, $000C, $0004, $A800;
  279.     {$ENDC}
  280. PROCEDURE MIDIGetClientName(clientID: OSType; VAR name: Str255);
  281.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  282.     INLINE $203C, $0010, $0004, $A800;
  283.     {$ENDC}
  284. PROCEDURE MIDISetClientName(clientID: OSType; name: Str255);
  285.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  286.     INLINE $203C, $0014, $0004, $A800;
  287.     {$ENDC}
  288. FUNCTION MIDIGetPorts(clientID: OSType): MIDIIDListHandle;
  289.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  290.     INLINE $203C, $0018, $0004, $A800;
  291.     {$ENDC}
  292. FUNCTION MIDIAddPort(clientID: OSType; BufSize: INTEGER; VAR refnum: INTEGER; init: MIDIPortParamsPtr): OSErr;
  293.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  294.     INLINE $203C, $001C, $0004, $A800;
  295.     {$ENDC}
  296. FUNCTION MIDIGetPortInfo(clientID: OSType; portID: OSType): MIDIPortInfoHandle;
  297.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  298.     INLINE $203C, $0020, $0004, $A800;
  299.     {$ENDC}
  300. FUNCTION MIDIConnectData(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  301.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  302.     INLINE $203C, $0024, $0004, $A800;
  303.     {$ENDC}
  304. FUNCTION MIDIUnConnectData(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  305.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  306.     INLINE $203C, $0028, $0004, $A800;
  307.     {$ENDC}
  308. FUNCTION MIDIConnectTime(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  309.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  310.     INLINE $203C, $002C, $0004, $A800;
  311.     {$ENDC}
  312. FUNCTION MIDIUnConnectTime(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  313.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  314.     INLINE $203C, $0030, $0004, $A800;
  315.     {$ENDC}
  316. PROCEDURE MIDIFlush(refnum: INTEGER);
  317.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  318.     INLINE $203C, $0034, $0004, $A800;
  319.     {$ENDC}
  320. FUNCTION MIDIGetReadHook(refnum: INTEGER): ProcPtr;
  321.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  322.     INLINE $203C, $0038, $0004, $A800;
  323.     {$ENDC}
  324. PROCEDURE MIDISetReadHook(refnum: INTEGER; hook: ProcPtr);
  325.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  326.     INLINE $203C, $003C, $0004, $A800;
  327.     {$ENDC}
  328. PROCEDURE MIDIGetPortName(clientID: OSType; portID: OSType; VAR name: Str255);
  329.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  330.     INLINE $203C, $0040, $0004, $A800;
  331.     {$ENDC}
  332. PROCEDURE MIDISetPortName(clientID: OSType; portID: OSType; name: Str255);
  333.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  334.     INLINE $203C, $0044, $0004, $A800;
  335.     {$ENDC}
  336. PROCEDURE MIDIWakeUp(refnum: INTEGER; time: LONGINT; period: LONGINT; timeProc: MIDITimeUPP);
  337.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  338.     INLINE $203C, $0048, $0004, $A800;
  339.     {$ENDC}
  340. PROCEDURE MIDIRemovePort(refnum: INTEGER);
  341.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  342.     INLINE $203C, $004C, $0004, $A800;
  343.     {$ENDC}
  344. FUNCTION MIDIGetSync(refnum: INTEGER): INTEGER;
  345.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  346.     INLINE $203C, $0050, $0004, $A800;
  347.     {$ENDC}
  348. PROCEDURE MIDISetSync(refnum: INTEGER; sync: INTEGER);
  349.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  350.     INLINE $203C, $0054, $0004, $A800;
  351.     {$ENDC}
  352. FUNCTION MIDIGetCurTime(refnum: INTEGER): LONGINT;
  353.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  354.     INLINE $203C, $0058, $0004, $A800;
  355.     {$ENDC}
  356. PROCEDURE MIDISetCurTime(refnum: INTEGER; time: LONGINT);
  357.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  358.     INLINE $203C, $005C, $0004, $A800;
  359.     {$ENDC}
  360. PROCEDURE MIDIStartTime(refnum: INTEGER);
  361.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  362.     INLINE $203C, $0060, $0004, $A800;
  363.     {$ENDC}
  364. PROCEDURE MIDIStopTime(refnum: INTEGER);
  365.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  366.     INLINE $203C, $0064, $0004, $A800;
  367.     {$ENDC}
  368. PROCEDURE MIDIPoll(refnum: INTEGER; offsetTime: LONGINT);
  369.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  370.     INLINE $203C, $0068, $0004, $A800;
  371.     {$ENDC}
  372. FUNCTION MIDIWritePacket(refnum: INTEGER; packet: MIDIPacketPtr): OSErr;
  373.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  374.     INLINE $203C, $006C, $0004, $A800;
  375.     {$ENDC}
  376. FUNCTION MIDIWorldChanged(clientID: OSType): BOOLEAN;
  377.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  378.     INLINE $203C, $0070, $0004, $A800;
  379.     {$ENDC}
  380. FUNCTION MIDIGetOffsetTime(refnum: INTEGER): LONGINT;
  381.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  382.     INLINE $203C, $0074, $0004, $A800;
  383.     {$ENDC}
  384. PROCEDURE MIDISetOffsetTime(refnum: INTEGER; offsetTime: LONGINT);
  385.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  386.     INLINE $203C, $0078, $0004, $A800;
  387.     {$ENDC}
  388. FUNCTION MIDIConvertTime(srcFormat: INTEGER; dstFormat: INTEGER; time: LONGINT): LONGINT;
  389.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  390.     INLINE $203C, $007C, $0004, $A800;
  391.     {$ENDC}
  392. FUNCTION MIDIGetRefCon(refnum: INTEGER): LONGINT;
  393.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  394.     INLINE $203C, $0080, $0004, $A800;
  395.     {$ENDC}
  396. PROCEDURE MIDISetRefCon(refnum: INTEGER; refCon: LONGINT);
  397.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  398.     INLINE $203C, $0084, $0004, $A800;
  399.     {$ENDC}
  400. FUNCTION MIDIGetClRefCon(clientID: OSType): LONGINT;
  401.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  402.     INLINE $203C, $0088, $0004, $A800;
  403.     {$ENDC}
  404. PROCEDURE MIDISetClRefCon(clientID: OSType; refCon: LONGINT);
  405.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  406.     INLINE $203C, $008C, $0004, $A800;
  407.     {$ENDC}
  408. FUNCTION MIDIGetTCFormat(refnum: INTEGER): INTEGER;
  409.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  410.     INLINE $203C, $0090, $0004, $A800;
  411.     {$ENDC}
  412. PROCEDURE MIDISetTCFormat(refnum: INTEGER; format: INTEGER);
  413.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  414.     INLINE $203C, $0094, $0004, $A800;
  415.     {$ENDC}
  416. PROCEDURE MIDISetRunRate(refnum: INTEGER; rate: INTEGER; time: LONGINT);
  417.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  418.     INLINE $203C, $0098, $0004, $A800;
  419.     {$ENDC}
  420. FUNCTION MIDIGetClientIcon(clientID: OSType): Handle;
  421.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  422.     INLINE $203C, $009C, $0004, $A800;
  423.     {$ENDC}
  424. FUNCTION MIDICallAddress(callNum: INTEGER): ProcPtr;
  425.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  426.     INLINE $203C, $00A4, $0004, $A800;
  427.     {$ENDC}
  428. PROCEDURE MIDISetConnectionProc(refNum: INTEGER; connectionProc: ProcPtr; refCon: LONGINT);
  429.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  430.     INLINE $203C, $00A8, $0004, $A800;
  431.     {$ENDC}
  432. PROCEDURE MIDIGetConnectionProc(refnum: INTEGER; VAR connectionProc: ProcPtr; VAR refCon: LONGINT);
  433.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  434.     INLINE $203C, $00AC, $0004, $A800;
  435.     {$ENDC}
  436. PROCEDURE MIDIDiscardPacket(refnum: INTEGER; packet: MIDIPacketPtr);
  437.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  438.     INLINE $203C, $00B0, $0004, $A800;
  439.     {$ENDC}
  440. FUNCTION MDVRSignIn(clientID: OSType; refCon: LONGINT; icon: Handle; VAR name: Str255): OSErr;
  441.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  442.     INLINE $203C, $00B4, $0004, $A800;
  443.     {$ENDC}
  444. PROCEDURE MDVRSignOut(clientID: OSType);
  445.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  446.     INLINE $203C, $00B8, $0004, $A800;
  447.     {$ENDC}
  448. FUNCTION MDVROpen(portType: INTEGER; refnum: INTEGER): MDVRPtr;
  449.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  450.     INLINE $203C, $00BC, $0004, $A800;
  451.     {$ENDC}
  452. PROCEDURE MDVRClose(driverPtr: MDVRPtr);
  453.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  454.     INLINE $203C, $00C0, $0004, $A800;
  455.     {$ENDC}
  456. PROCEDURE MDVRControlIn(portPtr: MDVRPtr; inputCtl: MDVRInCtlPtr);
  457.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  458.     INLINE $203C, $00C4, $0004, $A800;
  459.     {$ENDC}
  460. PROCEDURE MDVRControlOut(portPtr: MDVRPtr; outputCtl: MDVROutCtlPtr);
  461.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  462.     INLINE $203C, $00C8, $0004, $A800;
  463.     {$ENDC}
  464. PROCEDURE MDVRIn(portPtr: MDVRPtr);
  465.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  466.     INLINE $203C, $00CC, $0004, $A800;
  467.     {$ENDC}
  468. PROCEDURE MDVROut(portPtr: MDVRPtr; dataPtr: CStringPtr; length: INTEGER);
  469.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  470.     INLINE $203C, $00D0, $0004, $A800;
  471.     {$ENDC}
  472. PROCEDURE MDVRNotesOff(portPtr: MDVRPtr; mode: INTEGER);
  473.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  474.     INLINE $203C, $00D4, $0004, $A800;
  475.     {$ENDC}
  476.  
  477. CONST
  478.     uppMIDIReadHookProcInfo = $000003E0;
  479.     uppMIDITimeProcInfo = $000003C0;
  480.     uppMIDIConnectionProcInfo = $0009FB80;
  481.     uppMDVRCommProcInfo = $00000EB0;
  482.     uppMDVRTimeCodeProcInfo = $00000E80;
  483.     uppMDVRReadProcInfo = $00000EC0;
  484.  
  485. FUNCTION NewMIDIReadHookProc(userRoutine: MIDIReadHookProcPtr): MIDIReadHookUPP;
  486.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  487.     INLINE $2E9F;
  488.     {$ENDC}
  489.  
  490. FUNCTION NewMIDITimeProc(userRoutine: MIDITimeProcPtr): MIDITimeUPP;
  491.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  492.     INLINE $2E9F;
  493.     {$ENDC}
  494.  
  495. FUNCTION NewMIDIConnectionProc(userRoutine: MIDIConnectionProcPtr): MIDIConnectionUPP;
  496.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  497.     INLINE $2E9F;
  498.     {$ENDC}
  499.  
  500. FUNCTION NewMDVRCommProc(userRoutine: MDVRCommProcPtr): MDVRCommUPP;
  501.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  502.     INLINE $2E9F;
  503.     {$ENDC}
  504.  
  505. FUNCTION NewMDVRTimeCodeProc(userRoutine: MDVRTimeCodeProcPtr): MDVRTimeCodeUPP;
  506.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  507.     INLINE $2E9F;
  508.     {$ENDC}
  509.  
  510. FUNCTION NewMDVRReadProc(userRoutine: MDVRReadProcPtr): MDVRReadUPP;
  511.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  512.     INLINE $2E9F;
  513.     {$ENDC}
  514.  
  515. FUNCTION CallMIDIReadHookProc(myPacket: MIDIPacketPtr; myRefCon: LONGINT; userRoutine: MIDIReadHookUPP): INTEGER;
  516.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  517.     INLINE $205F, $4E90;
  518.     {$ENDC}
  519.  
  520. PROCEDURE CallMIDITimeProc(curTime: LONGINT; myRefCon: LONGINT; userRoutine: MIDITimeUPP);
  521.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  522.     INLINE $205F, $4E90;
  523.     {$ENDC}
  524.  
  525. PROCEDURE CallMIDIConnectionProc(refnum: INTEGER; refcon: LONGINT; portType: INTEGER; clientID: OSType; portID: OSType; connect: BOOLEAN; direction: INTEGER; userRoutine: MIDIConnectionUPP);
  526.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  527.     INLINE $205F, $4E90;
  528.     {$ENDC}
  529.  
  530. FUNCTION CallMDVRCommProc(refnum: INTEGER; request: INTEGER; refCon: LONGINT; userRoutine: MDVRCommUPP): LONGINT;
  531.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  532.     INLINE $205F, $4E90;
  533.     {$ENDC}
  534.  
  535. PROCEDURE CallMDVRTimeCodeProc(refnum: INTEGER; newFormat: INTEGER; refCon: LONGINT; userRoutine: MDVRTimeCodeUPP);
  536.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  537.     INLINE $205F, $4E90;
  538.     {$ENDC}
  539.  
  540. PROCEDURE CallMDVRReadProc(midiChars: CStringPtr; length: INTEGER; refCon: LONGINT; userRoutine: MDVRReadUPP);
  541.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  542.     INLINE $205F, $4E90;
  543.     {$ENDC}
  544.  
  545. {$ALIGN RESET}
  546. {$POP}
  547.  
  548. {$SETC UsingIncludes := MIDIIncludes}
  549.  
  550. {$ENDC} {__MIDI__}
  551.  
  552. {$IFC NOT UsingIncludes}
  553.  END.
  554. {$ENDC}
  555.